com.supermap.ar.areffect

Class OrientationListener

  • java.lang.Object
    • com.supermap.ar.areffect.OrientationListener
  • All Implemented Interfaces:
    android.hardware.SensorEventListener


    public class OrientationListener
    extends java.lang.Object
    implements android.hardware.SensorEventListener
    Orientation listener
    • Constructor Detail

      • OrientationListener

        public OrientationListener(android.content.Context context)
        The constructor.
        Parameters:
        context -
    • Method Detail

      • registerListener

        public void registerListener()
             Registers acceleration and geomagnetic field sensor listener
             Calls in onResume
         
      • unregisterListener

        public void unregisterListener()
              Deleting listener
              Calls on onPause
         
      • onSensorChanged

        public void onSensorChanged(android.hardware.SensorEvent event)
        Specified by:
        onSensorChanged in interface android.hardware.SensorEventListener
      • onAccuracyChanged

        public void onAccuracyChanged(android.hardware.Sensor sensor,
                                      int accuracy)
        Specified by:
        onAccuracyChanged in interface android.hardware.SensorEventListener